#ifndef MENU_H
#define MENU_H

#include <stdio.h>
#include "control.h"
#include "engine.h"
#include "main.h"
#include "keyboard.h"
#include "timer.h"
#include "vc.h"
#include "vclib.h"
#include "vga.h"

extern unsigned char menuptr[256];
extern unsigned char charptr[960];
extern unsigned char itmptr[576];
extern unsigned char gsimg[512];
extern char menuactive;
extern char whoisptr;

// used by shop code
extern char bcs;

// used by CalcBuyEquipPreview
extern int atkp;
extern int defp;
extern int magp;
extern int mgrp;
extern int hitp;
extern int dodp;
extern int mblp;
extern int ferp;
extern int reap;

#define bgcolor 154
#define grey1 14
#define grey2 26
#define white 31

extern void SellCharItem(char c);
extern void ConfirmSell(char c, char ptr);
extern void BuyItem(char ptr);
extern void PurchaseItem(char c, char i);
extern void BuyOrBuyEquip(char c, char ptr);
extern void SellCharMagic(char c);
extern void MConfirmSell(char c, char ptr);
extern void BuyMagic(char ptr);
extern void PurchaseMagic(char c, char i);

extern void border(int x, int y, int x2, int y2);
extern void menubox(int x, int y, int x2, int y2);
extern void tmenubox(int x, int y, int x2, int y2);
extern void DrawPartyStats();
extern void DrawMainMenu(int ptr);
extern int WhoIs(int i);
extern void ReOrder(int i);
extern void StatusScreen(char cz);
extern void MainMenu();
extern void Volume();
extern void SystemMenu();
extern void PutBuySellBox(char p);
extern void PutGPBox();
extern void PutCharBox(char a,char b, char c, char d, char e, char p);
extern void PutMessageBox(char *str);
extern void PutItemName(char *str);
extern void PutItemDesc(char *str);
extern void PutEquipBox(char c);
extern void PutItemBox(char l);
extern void SellMenu();
extern void PutStoreInv();
extern void PutBuyCharBox(char ptr, char p);
extern void BuyMenu();
extern void CalcBuyEquipPreview(int a,int i);
extern void PutEquipPreview(char c, char ptr);
extern void MPutEquipBox(char c);
extern void PutMagicBox(char l);
extern void MSellMenu();
extern void RemoveMagic(char c, char i);
extern void MPutStoreInv();
extern void MPutBuyCharBox(char ptr, char p);
extern void MBuyMenu();

#endif
